import requests

from common.db_util import DBUtil
from common.get_header import get_header
from config import URL


# 编辑用户
class YYedituser(object):
    url = URL + "user"
    header = get_header()

    @classmethod
    def yy_edit_user(cls, json_data):
        resp = requests.put(url=cls.url, headers=cls.header, json=json_data)
        return resp


if __name__ == '__main__':
    # res1 = DBUtil.select_one("select user_id from sys_user where user_name = 'chen'")
    # print(res1)
    data = {"userId": "889156644716412928", "userName": "chen", "sex": "1"}
    res = YYedituser.yy_edit_user(data)
    print(res.json())

